FROM python:3.8
WORKDIR /opt
RUN apt update && apt install sshpass rsync vim -y
COPY . /opt
RUN pip install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple
RUN pip3 install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple
RUN python3 manage.py migrate && python3 user.py
EXPOSE 8000
CMD python3 manage.py runserver 0.0.0.0:8000
